const { ApiController } = require('jax')

class AdminApiController extends ApiController {
  /**
   * 超级管理员（平台管理员）
   */
  get isSuperAdmin() {
    const { ctx } = this
    const { admin } = ctx.state

    return admin.systemType == 'admin' && admin.isAdmin
  }
}

module.exports = AdminApiController
